#include<iostream>

using namespace std;
/*
 作者: 杨老师
  - * 的输出是 2n - 1
  - " "  的输出是 n - 1
*/
void print(int n,string s){
  		for(int i=1; i <= n; i++ ){
	  		for(int j = 1 ;j <= n-i ;j++ ){
	  			cout << " "; 
		    }	
		    for(int k = 1; k <= 2*i-1 ;k++ ){
	  			cout << s; 
		    }	
		    cout << endl; 
	    }
 }
int main(){

  	int n;
  	string s;
  	
  	cin >> n >> s;
  
  	print(n,s);
  	print(2*n,s);
  	print(4*n,s);
	return 0;
}

